﻿<UserControl x:Class="Common.Controls.Login"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:extended="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
    xmlns:liquid="clr-namespace:Liquid;assembly=Liquid"     
    xmlns:extensions="clr-namespace:SLExtensions.Controls;assembly=SLExtensions.Controls"
    xmlns:controls="clr-namespace:Common.Controls"
    Width="400" Height="Auto" IsTabStop="False" Loaded="UserControl_Loaded" KeyUp="UserControl_KeyUp">
    <Border Padding="5" CornerRadius="10">
        <Border.Background>
            <LinearGradientBrush StartPoint="0,0" EndPoint=".5,1">
                <GradientStop Color="LightGray" Offset="0"/>
                <GradientStop Color="Gray" Offset=".4"/>
                <GradientStop Color="Gray" Offset=".6"/>
                <GradientStop Color="LightGray" Offset="1"/>
            </LinearGradientBrush>
        </Border.Background>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <controls:Logo Grid.Row="0" HorizontalAlignment="Center" Margin="0,8,0,8"/>
            <Grid Grid.Row="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="200"/>
                    <ColumnDefinition Width="150"/>
                </Grid.ColumnDefinitions>
                <Grid Grid.Column="0" VerticalAlignment="Stretch">
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>                    
                    <TextBox Margin="17,5,17,5" FontSize="16" x:Name="tbUserName" 
                             IsTabStop="True" TabIndex="1" Grid.Row="0"/>
                    <PasswordBox Margin="17,0,17,5" HorizontalAlignment="Stretch"
                                    KeyUp="UserControl_KeyUp" IsTabStop="True" 
                                    TabIndex="2" Grid.Row="1" x:Name="tbPassword"/>
                    <StackPanel Margin="17,10,17,5" Grid.Row="2" Orientation="Horizontal">
                        <Button x:Name="btnLogin" TabIndex="3" IsTabStop="True" Click="btnLogin_Click" Content="Login"/>

                    </StackPanel>
                    <TextBlock x:Name="lblStatus" FontWeight="Bold" Grid.Row="3"
                           FontSize="12" TextWrapping="Wrap" Margin="10,0,0,0"/>
                    <TextBlock Grid.Row="4" x:Name="Error" HorizontalAlignment="Stretch" 
                           Height="Auto" FontWeight="Bold" FontSize="12" 
                           TextWrapping="Wrap" Margin="5,0,0,0" Foreground="Red"/>
                </Grid>
                <Grid Grid.Column="1">
                    <Button x:Name="btnCreateAccount" VerticalAlignment="Top" 
                            Margin="15,35,0,0" Width="125" Height="30" 
                         TabIndex="3" IsTabStop="True" 
                         Click="btnCreateAccount_Click" Content="Create Account"/>
                </Grid>
            </Grid>
        </Grid>
       
        
    </Border>
</UserControl>
